<template>
  <div>
    <div class="card-box">
      <el-card class="elcard" style="flex:.5;align-self:normal;margin-right:10px;">
        <div class="plate">
          <div class="title-box">
            <p>
              <i class="iconfont icon-gongshangchufa" style="font-size:20px"></i>
              <span>工商检查</span>
            </p>
            <el-button
              size="mini"
              type="primary"
              @click="goList('gongshang')"
              :disabled="!business"
              >查看</el-button
            >
          </div>
          <ul>
            <li>
              <p>经营异常：</p>
              <div>{{ mainData.abnormallist_total}}次</div>
            </li>
            <li>
              <p>抽查检查：</p>
              <div>{{ mainData.checkuplist_total}}次</div>
            </li>
            <li>
              <p>行政处罚内容：</p>
              <div>{{ mainData.adminpunish_total}}次</div>
            </li>
          </ul>
        </div>
      </el-card>
      <el-card class="elcard" style="flex:.5;align-self:normal;margin-left:10px;">
        <div class="plate">
          <div class="title-box">
            <p>
              <i class="iconfont icon-fayuan"></i>
              <span>涉诉检查</span>
            </p>
            <el-button
              size="mini"
              @click="goList('appeal')"
              type="primary"
              :disabled="!appeal"
              >查看</el-button
            >
          </div>
          <ul>
            <li>
              <p>开庭公告：</p>
              <div>{{ mainData.courtnotice_total}}次</div>
            </li>
            <li>
              <p>被执行人：</p>
              <div>{{ mainData.executedperson_total}}次</div>
            </li>
            <li>
              <p>裁判文书：</p>
              <div>{{ mainData.lawsuitlist_total}}次</div>
            </li>
          </ul>
          <ul>
            <li>
              <p>法院公告：</p>
              <div>{{ mainData.notice_total}}次</div>
            </li>
            <li>
              <p>失信信息：</p>
              <div>{{ mainData.executionlist_total}}次</div>
            </li>
            <li>
              <p>股权冻结：</p>
              <div>{{ mainData.judicialchange_total}}次</div>
            </li>
          </ul>
        </div>
      </el-card>
    </div>
    <div class="card-box">
      <el-card class="elcard" style="flex:.5;align-self:normal;margin-right:10px;">
        <div class="plate">
          <div class="title-box">
            <p>
              <i class="iconfont icon-shuiwu"></i>
              <span>税务检查</span>
            </p>
            <el-button
              size="mini"
              @click="goList('revenue')"
              type="primary"
              :disabled="!taxation"
              >查看</el-button
            >
          </div>
          <ul>
            <li>
              <p>欠税次数：</p>
              <div>{{ mainData.overduetax_total}}次</div>
            </li>
          </ul>
        </div>
      </el-card>
      <el-card class="elcard" style="flex:.5;align-self:normal;margin-left:10px;">
        <div class="plate">
          <div class="title-box">
            <p>
              <i class="iconfont icon-zichanguanli1" style="font-size:21px"></i>
              <span>资产检查</span>
            </p>
            <el-button
              size="mini"
              @click="goList('assets')"
              type="primary"
              :disabled="!lands"
              >查看</el-button
            >
          </div>
          <ul>
            <li>
              <p>动产抵押：</p>
              <div>{{ mainData.mortgages_total}}次</div>
            </li>
            <li>
              <p>股权出质：</p>
              <div>{{ mainData.equityqualities_total}}次</div>
            </li>
          </ul>
        </div>
      </el-card>
    </div>
    <!--工商检查-->
    <div id="gongshang">
      <!-- 工商检查 -->
      <div id="operate" class="card-box" :class="['court', 'operate', { show: operateShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">经营异常</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="operate.items">
              <el-table-column prop="department" label="做出决定机关"></el-table-column>
              <el-table-column prop="in_reason" label="经营异常原因" width="200"></el-table-column>
              <el-table-column prop="out_date" label="移出日期">
                <template slot-scope="scope">{{scope.row.out_date !== '' ? scope.row.out_date : '-'}}</template>
              </el-table-column>
              <el-table-column prop="out_reason" label="移出经营异常原因" width="200">
                <template slot-scope="scope">{{scope.row.out_reason !== '' ? scope.row.out_reason : '-'}}</template>
              </el-table-column>
              <el-table-column prop="in_date" label="列入日期"></el-table-column>
            </el-table>
            <el-page
              v-if="operate.items.length > 0"
              :total="operate.total"
              :ips="pageSkip"
              :sendCurrentPage="operateIndex"
              @currentPage="operateChange"
            />
          </div>
        </el-card>
      </div>

      <!--行政处罚-->
      <div class="card-box" :class="['court', 'punish', { show: punishShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">行政处罚</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="punish.items">
              <el-table-column prop="number" label="决定书文号">
              </el-table-column>
              <el-table-column prop="illegal_type" label="违法行为类型">
              </el-table-column>
              <el-table-column prop="content" label="行政处罚内容" width="250">
              </el-table-column>
              <el-table-column prop="department" label="决定机关名称">
              </el-table-column>
              <el-table-column prop="date" label="处罚决定日期">
              </el-table-column>
            </el-table>
            <el-page
              v-if="punish.items.length > 0"
              :total="punish.total"
              :ips="pageSkip"
              :sendCurrentPage="punishIndex"
              @currentPage="punishChange"
            />
          </div>
        </el-card>
      </div>

      <!--抽查检查-->
      <div class="card-box" :class="['court', 'inspect', { show: inspectShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">抽查检查</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="inspect.items">
              <el-table-column prop="department" label="检查实施机关">
              </el-table-column>
              <el-table-column prop="type" label="类型"></el-table-column>
              <el-table-column prop="date" label="日期"> </el-table-column>
              <el-table-column prop="result" label="结果" width="250">
              </el-table-column>
            </el-table>
            <el-page
              v-if="inspect.items.length > 0"
              :total="inspect.total"
              :ips="pageSkip"
              :sendCurrentPage="inspectIndex"
              @currentPage="inspectChange"
            />
          </div>
        </el-card>
      </div>
    </div>
    <!--涉诉检查-->
    <div id="appeal">
      <div class="card-box" :class="['court', 'courtBox', { show: courtShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">开庭公告</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="court.items">
              <el-table-column prop="case_no" label="案号" width="300"></el-table-column>
              <el-table-column prop="pure_role" label="身份" width="200">
                <template slot-scope="scope">{{scope.row.pure_role !== '' ? scope.row.pure_role : '-'}}</template>
              </el-table-column>
              <el-table-column prop="related_companies" label="当事人" width="340">
                <template slot-scope="scope">
                  <div v-if="scope.row.related_companies && scope.row.related_companies !== ''">
                    <!-- 原告/被告 -->
                    <p v-if="JSON.parse(scope.row.related_companies).filter(ite => ite.role === '原告').length > 0">
                      原告：
                      <span v-for="(item, index) in JSON.parse(scope.row.related_companies)" :key="index">
                        <span v-if="item.role === '原告'" class="companies">{{item.name}}</span>
                      </span><br/>
                      被告：
                      <span v-for="(item) in JSON.parse(scope.row.related_companies)" :key="item.name">
                        <span v-if="item.role === '被告'" class="companies">{{item.name}}</span>
                      </span>
                    </p>
                    <!-- 上诉人/被上诉人 -->
                    <p v-if="JSON.parse(scope.row.related_companies).filter(ite => ite.role === '上诉人').length > 0">
                      上诉人：
                      <span v-for="(item, index) in JSON.parse(scope.row.related_companies)" :key="index">
                        <span v-if="item.role === '上诉人'" class="companies">{{item.name}}</span>
                      </span><br/>
                      被上诉人：
                      <span v-for="(item) in JSON.parse(scope.row.related_companies)" :key="item.name">
                        <span v-if="item.role === '被上诉人'" class="companies">{{item.name}}</span>
                      </span>
                    </p>
                  </div>
                  <div v-else>-</div>
                </template>
              </el-table-column>
              <el-table-column prop="hearing_date" label="开庭时间" width="200">
                <template slot-scope="scope">{{scope.row.hearing_date && scope.row.hearing_date.split('T')[0]}}</template>
              </el-table-column>
              <el-table-column prop="cause_action" label="案由"></el-table-column>
            </el-table>
            <el-page
              v-if="court.items.length > 0"
              :total="court.total"
              :ips="pageSkip"
              :sendCurrentPage="courtPageIndex"
              @currentPage="courtPageChange"
            />
          </div>
        </el-card>
      </div>
      <!--法院公告-->
      <div class="card-box" :class="['court', 'notice', { show: noticeShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">法院公告</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="notice.items">
              <el-table-column prop="type" label="公告类型"></el-table-column>
              <el-table-column prop="people" label="当事人"></el-table-column>
              <el-table-column prop="date" label="发布时间" width="135"></el-table-column>
              <el-table-column
                prop="content"
                label="公告内容"
                width="544"
              ></el-table-column>
            </el-table>
            <el-page
              v-if="notice.items.length > 0"
              :total="notice.total"
              :ips="pageSkip"
              :sendCurrentPage="noticePageIndex"
              @currentPage="noticePageChange"
            />
          </div>
        </el-card>
      </div>
      <!--裁判文书 -->
      <div class="card-box" :class="['court', 'referee', { show: refereeShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">裁判文书</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="referee.items">
              <el-table-column prop="case_cause" label="案由"></el-table-column>
              <el-table-column prop="date" label="判决时间"></el-table-column>
              <el-table-column prop="title" label="标题" width="400"></el-table-column>
              <el-table-column
                prop="judgeresult"
                label="判决结果"
                width="400"
              ></el-table-column>
            </el-table>
            <el-page
              v-if="referee.items.length > 0"
              :total="referee.total"
              :ips="pageSkip"
              :sendCurrentPage="refereePageIndex"
              @currentPage="refereePageChange"
            />
          </div>
        </el-card>
      </div>
      <!-- 股权冻结 -->
      <div class="card-box" :class="['court', 'assist', { show: assistShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd clearfix">
            <span class="tit">股权冻结</span>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="assist.items">
              <el-table-column
                prop="be_executed_person"
                label="被执行人"
                width="200"
              ></el-table-column>
              <el-table-column prop="amount" label="股权数额"></el-table-column>
              <el-table-column
                prop="executive_court"
                label="执行法院"
                width="200">
                <template slot-scope="scope">{{scope.row.executive_court !== '' ? scope.row.executive_court : '-'}}</template>  
              </el-table-column>
              <el-table-column
                prop="number"
                label="执行通知书号"
                width="150">
              </el-table-column>
              <el-table-column prop="type" label="类型"></el-table-column>
              <el-table-column prop="status" label="状态"></el-table-column>
            </el-table>
            <el-page
              v-if="assist.items.length > 0"
              :total="assist.total"
              :ips="pageSkip"
              :sendCurrentPage="assistPageIndex"
              @currentPage="assisPageChange"
            />
          </div>
        </el-card>
      </div>
      <!--被执行人-->
      <div
        class="card-box court enforced assist"
        :class="['court', 'enforced', 'assist', { show: enforcedShow }]"
      >
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd courtTitle clearfix">
            <span class="tit">被执行人</span>
            <div class="selectBox">
              {{ rightText }}：{{ mainData.executedperson_total}}
            </div>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="enforced.items">
              <el-table-column prop="case_number" label="案号"></el-table-column>
              <el-table-column prop="amount" label="执行标的" width="200"></el-table-column>
              <el-table-column prop="case_date" label="立案时间" width="200"></el-table-column>
              <el-table-column prop="court" label="执行法院"></el-table-column>
              <el-table-column prop="status" label="官网案件状态">
                <template slot-scope="scope">{{scope.row.status === '0' ? '执行中' : '已结案'}}</template>
              </el-table-column>
            </el-table>
            <el-page
              v-if="enforced.items.length > 0"
              :total="enforced.total"
              :ips="pageSkip"
              :sendCurrentPage="enforcedPageIndex"
              @currentPage="enforcedPageChange"
            />
          </div>
        </el-card>
      </div>
      <!--失信人信息-->
      <div class="card-box" :class="['court', 'dishonest', 'assist', { show: dishonestShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd courtTitle clearfix">
            <span class="tit">失信人信息</span>
            <div class="selectBox">
              {{ rightText }}：{{ mainData.executionlist_total}}
            </div>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="dishonest.items">
              <el-table-column prop="case_number" label="案号" width="200"></el-table-column>
              <el-table-column prop="doc_number" label="执行根据文号"></el-table-column>
              <el-table-column prop="amount" label="执行标的" width="200"></el-table-column>
              <el-table-column prop="date" label="立案时间" width="150"></el-table-column>
              <el-table-column prop="court" label="执行法院"></el-table-column>
              <el-table-column
                prop="execution_status"
                label="被执行人履行情况"
              ></el-table-column>
            </el-table>
            <el-page
              v-if="dishonest.items.length > 0"
              :total="dishonest.total"
              :ips="pageSkip"
              :sendCurrentPage="dishonestPageIndex"
              @currentPage="dishonestPageChange"
            />
          </div>
        </el-card>
      </div>
    </div>

    <!--涉诉检查-->
    <!--税务检查-->
    <div id="revenue" class="card-box" :class="['court', 'revenue', { show: revenueShow }]">
      <el-card class="elcard" style="flex:1;align-self:normal;">
        <div slot="header" class="hd courtTitle clearfix">
          <span class="tit">税务检查</span>
          <div class="selectBox">
            {{ rightText }}：{{ mainData.overduetax_total}}
          </div>
        </div>
        <!-- 列表 -->
        <div class="courtList">
          <el-table :data="revenue.items">
            <el-table-column prop="oper_name" label="负责人姓名"></el-table-column>
            <el-table-column prop="oper_id_num" label="证件号码">
              <template slot-scope="scope">{{scope.row.oper_id_num !== '' ? scope.row.oper_id_num : '-'}}</template>
            </el-table-column>
            <el-table-column prop="address" label="经营地点">
              <template slot-scope="scope">{{scope.row.address !== '' ? scope.row.address : '-'}}</template>
            </el-table-column>
            <el-table-column prop="overdue_type" label="欠税税种"></el-table-column>
            <el-table-column prop="overdue_amount" label="欠税余额"></el-table-column>
            <el-table-column prop="area" label="所属市县区">
              <template slot-scope="scope">{{scope.row.area !== '' ? scope.row.area : '-'}}</template>
            </el-table-column>
            <el-table-column prop="overdue_period" label="欠税周期">
              <template slot-scope="scope">{{scope.row.overdue_period !== '' ? scope.row.overdue_period : '-'}}</template>
            </el-table-column>
            <el-table-column prop="pub_date" label="发布日期">
              <template slot-scope="scope">{{(scope.row.pub_date  && scope.row.pub_date !== '') ? scope.row.pub_date : '-'}}</template>
            </el-table-column>
            <el-table-column prop="pub_department" label="发布单位"></el-table-column>
          </el-table>
          <el-page
            v-if="revenue.items.length > 0"
            :total="revenue.total"
            :ips="pageSkip"
            :sendCurrentPage="revenueIndex"
            @currentPage="revenueChange"
          />
        </div>
      </el-card>
    </div>

    <!--资产检查 -->
    <div id="assets">
      <!--动产抵押-->
      <div class="card-box" :class="['court', 'property', { show: propertyShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd courtTitle clearfix">
            <span class="tit">动产抵押</span>
            <div class="selectBox">
              {{ rightText }}：{{ mainData.mortgages_total}}
            </div>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="property.items">
              <el-table-column prop="number" label="登记编号"></el-table-column>
              <el-table-column
                prop="department"
                label="登记机关"
                width="170"
              ></el-table-column>
              <el-table-column prop="guarantees" label="抵押物" width="170">
                <template slot-scope="scope">
                  <p v-for="(item, index) in JSON.parse(scope.row.guarantees)" :key="index">{{item.name}}</p>
                </template>
              </el-table-column>
              <el-table-column prop="type" label="被担保债权种类">
                <template slot-scope="scope">{{scope.row.type !== '' ? scope.row.type : '-'}}</template>
              </el-table-column>
              <el-table-column prop="amount" label="被担保债权数额"></el-table-column>
              <el-table-column prop="status" label="状态"></el-table-column>
              <el-table-column prop="date" label="登记日期"></el-table-column>
            </el-table>
            <el-page
              v-if="property.items.length > 0"
              :total="property.total"
              :ips="pageSkip"
              :sendCurrentPage="propertyIndex"
              @currentPage="propertyChange"
            />
          </div>
        </el-card>
      </div>
      <!--股权出质-->
      <div class="card-box" :class="['court', 'stockRight', { show: stockShow }]">
        <el-card class="elcard" style="flex:1;align-self:normal;">
          <div slot="header" class="hd courtTitle clearfix">
            <span class="tit">股权出质</span>
            <div class="selectBox">
              {{ rightText }}：{{ mainData.equityqualities_total}}
            </div>
          </div>
          <!-- 列表 -->
          <div class="courtList">
            <el-table :data="stockRight.items">
              <el-table-column
                prop="object_company"
                label="标的方"
                width="270">
                <template slot-scope="scope">{{scope.row.object_company !== '' ? scope.row.object_company : '-'}}</template>  
              </el-table-column>
              <el-table-column prop="pawnee" label="质权人" width="270"></el-table-column>
              <el-table-column prop="pledgor_amount" label="出质股权数"></el-table-column>
              <el-table-column prop="date" label="股权出质登记日期"></el-table-column>
              <el-table-column prop="status" label="状态"></el-table-column>
            </el-table>
            <el-page
              v-if="stockRight.items.length > 0"
              :total="stockRight.total"
              :ips="pageSkip"
              :sendCurrentPage="stockIndex"
              @currentPage="stockRightChange"
            />
          </div>
        </el-card>
      </div>
    </div>
  </div>
</template>
<script>
import { mapState } from "vuex";
import elPage from "@/views/components/vPagination";
export default {
  components: { elPage },
  data() {
    return {
      companyName: this.$route.query.name || "", //公司名称
      nothing: "暂无信息",
      mainData: {
        changerecord_total: "--",
        abnormallist_total: "--",
        adminpunish_total: "--",
        checkuplist_total: "--",
        courtnotice_total: "--",
        notice_total: "--",
        lawsuitlist_total: "--",
        judicialchange_total: "--",
        executedperson_total: "--",
        executionlist_total: "--",
        overduetax_total: "--",
        mortgages_total: "--",
        equityqualities_total: "--",
      },
      rightText: '全部',
      business: false, //工商检查 查看 按钮默认值
      appeal: false, //涉诉检查 查看 按钮默认值
      taxation: false, //税务检查 查看 按钮默认值
      lands: false, //资产检查 查看 按钮默认值
      //开庭列表数据
      pageSkip: 5, //一页的条数
      //经营异常
      operateIndex: 0,
      operateTotal: null,
      operateTotalType: 0,
      operateShow: false,
      operate: {
        total_year: "--",
        total: 5,
        all: [],
        items: []
      },
      inspectShow: false,
      //行政处罚
      punishIndex: 0,
      punishTotal: null,
      punishTotalType: 0,
      punishShow: false,
      punish: {
        total: 5,
        all: [],
        items: []
      },
      inspectIndex: 0,
      inspect: {
        total: 5,
        all: [],
        items: []
      },
      //开庭公告
      courtPageIndex: 0,
      courtTotal: null,
      courtTotalType: 0,
      courtShow: false,
      court: {
        total: 5,
        all: [],
        items: []
      },
      //法院公告
      noticePageIndex: 0,
      noticeTotal: null,
      noticeTotalType: 0,
      noticeShow: false,
      notice: {
        total: 5,
        all: [],
        items: []
      },
      //裁判文书
      refereePageIndex: 0,
      refereeTotal: null,
      refereeTotalType: 0,
      refereeShow: false,
      referee: {
        total: 5,
        all: [],
        items: []
      },
      assistShow: false,
      assistPageIndex: 0,
      assist: {
        total: 5,
        all: [],
        items: []
      },
      enforcedPageIndex: 0,
      enforcedShow: false,
      enforced: {
        total: 5,
        all: [],
        items: []
      },
      dishonestPageIndex: 0,
      dishonestShow: false,
      dishonest: {
        total: 5,
        all: [],
        items: []
      },
      revenueIndex: 0,
      revenueShow: false,
      revenue: {
        total: 5,
        all: [],
        items: []
      },
      propertyIndex: 0,
      propertyShow: false,
      property: {
        total: 5,
        all: [],
        items: []
      },
      stockIndex: 0,
      stockShow: false,
      //股权出资
      stockRight: {
        total: 5,
        all: [],
        items: []
      },
      landIndex: 0,
      landShow: false,
      land: {
        total: 5,
        all: [],
        items: []
      },
      eid: ''
    };
  },
  computed: {
    ...mapState(['companyNameAndEid']),
  },
  methods: {
    //滚动到指定位置
    goList(id) {
      // var scroll = document.getElementById(id).offsetTop - 70;
      // window.scrollTo(0, scroll);
      let _top = $('#' + id).offset().top;
      $("html, body").animate({ scrollTop: _top - 80 }, 500);
    },
    getBasicInfo(tid, ipi, callback) {
      this.$post(this.$Url.basicInfo.selectByName, {
        eid: this.eid,
        tid: tid,
        ipi: ipi,
        ips: this.pageSkip
      }).then(data => {
        if(data.status ==200 && data.data){
          callback && callback(data.data);
        }
      }).catch(err => {
        console.log(err)
      })
    },
    // 工商检查-经营异常
    getInfo1(ipi) {
      this.getBasicInfo('a18761dc5da152a70374c811bc0e1b57', ipi,
      (data)=>{
        this.mainData.abnormallist_total = data && data.page.totalRow
        if (parseInt(this.mainData.abnormallist_total) > 0) {
          this.operateShow = true //经营
          this.business = true
          this.operate.items = data && data.result
          this.operate.total = data && data.page.totalRow
        }
      })
    },
    // 工商检查-行政处罚内容
    getInfo2(ipi) {
      this.getBasicInfo('118d5ea79b7ada3032024ea2d1d1da96', ipi,
      (data)=>{
        this.mainData.adminpunish_total = data && data.page.totalRow
        if (parseInt(this.mainData.adminpunish_total) > 0) {
          this.punishShow = true //行政
          this.business = true
          this.punish.items = data && data.result
          this.punish.total = data && data.page.totalRow
        }
      })
    },
    // 工商检查-抽查检查
    getInfo3(ipi) {
      this.getBasicInfo('b9dc4c3fc9f618c7ceffbe0f46e6eccf', ipi,
      (data)=>{
        this.mainData.checkuplist_total = data && data.page.totalRow
        if (parseInt(this.mainData.checkuplist_total) > 0) {
          this.inspectShow = true //抽查
          this.business = true
          this.inspect.items = data && data.result
          this.inspect.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-开庭公告
    getInfo4(ipi) {
      this.getBasicInfo('4f226409d44e5a900c77321ae426c715', ipi,
      (data)=>{
        this.mainData.courtnotice_total = data && data.page.totalRow
        if (parseInt(this.mainData.courtnotice_total) > 0) {
          this.courtShow = true //开庭
          this.appeal = true
          this.court.items = data && data.result
          this.court.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-法院公告
    getInfo5(ipi) {
      this.getBasicInfo('96e8190c25511c923e3dd542c29da00d', ipi,
      (data)=>{
        this.mainData.notice_total = data && data.page.totalRow
        if (parseInt(this.mainData.notice_total) > 0) {
          this.noticeShow = true
          this.appeal = true
          this.notice.items = data && data.result
          this.notice.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-裁判文书
    getInfo6(ipi) {
      this.getBasicInfo('12c9d28c180a469d34b796556a1f2546', ipi,
      (data)=>{
        this.mainData.lawsuitlist_total = data && data.page.totalRow
        if (parseInt(this.mainData.lawsuitlist_total) > 0) {
          this.refereeShow = true
          this.appeal = true
          this.referee.items = data && data.result
          this.referee.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-股权冻结
    getInfo7(ipi) {
      this.getBasicInfo('4f97b0e6adb6ab8320f9c4eb1b14e9ed', ipi,
      (data)=>{
        this.mainData.judicialchange_total = data && data.page.totalRow
        if (parseInt(this.mainData.judicialchange_total) > 0) {
          this.assistShow = true
          this.appeal = true
          this.assist.items = data && data.result
          this.assist.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-被执行人
    getInfo8(ipi) {
      this.getBasicInfo('bbe876f51cd371c23955328625df3dc1', ipi,
      (data)=>{
        this.mainData.executedperson_total = data && data.page.totalRow
        if (parseInt(this.mainData.executedperson_total) > 0) {
          this.enforcedShow = true
          this.appeal = true
          this.enforced.items = data && data.result
          this.enforced.total = data && data.page.totalRow
        }
      })
    },
    // 涉诉检查-失信
    getInfo9(ipi) {
      this.getBasicInfo('4126757e9a1bd1210787317f3e180158', ipi,
      (data)=>{
        this.mainData.executionlist_total = data && data.page.totalRow
        if (parseInt(this.mainData.executionlist_total) > 0) {
          this.dishonestShow = true
          this.appeal = true
          this.dishonest.items = data && data.result
          this.dishonest.total = data && data.page.totalRow
        }
      })
    },

    // 税务检查-欠税次数
    getInfo10(ipi) {
      this.getBasicInfo('1b346692efb839ca9df54cc06050dbc6', ipi,
      (data)=>{
        this.mainData.overduetax_total = data && data.page.totalRow
        if (parseInt(this.mainData.overduetax_total) > 0) {
          this.revenueShow = true
          this.taxation = true
          this.revenue.items = data && data.result
          this.revenue.total = data && data.page.totalRow
        }
      })
    },
    // 资产检查-动产抵押
    getInfo11(ipi) {
      this.getBasicInfo('8aa8d326322895050a4427dc995a7a85', ipi,
      (data)=>{
        this.mainData.mortgages_total = data && data.page.totalRow
        if (parseInt(this.mainData.mortgages_total) > 0) {
          this.propertyShow = true
          this.lands = true
          this.property.items = data && data.result
          this.property.total = data && data.page.totalRow
        }
      })
    },
    // 资产检查-股权出质
    getInfo12(ipi) {
      this.getBasicInfo('e8ff41139cfa9f8176fd17d186f3faa9', ipi,
      (data)=>{
        this.mainData.equityqualities_total = data && data.page.totalRow
        if (parseInt(this.mainData.equityqualities_total) > 0) {
          this.stockShow = true
          this.lands = true
          this.stockRight.items = data && data.result
          this.stockRight.total = data && data.page.totalRow
        }
      })
    },

    //****工商检查
    //经营异常
    operateChange(val) {
      this.operateIndex = parseInt(val)
      this.getInfo1(this.operateIndex)
    },
    //行政处罚
    punishChange(val) {
      this.punishIndex = parseInt(val)
      this.getInfo2(this.punishIndex)
    },
    //抽查检查
    inspectChange(val) {
      this.inspectIndex = parseInt(val)
      this.getInfo3(this.inspectIndex)
    },
    //****涉诉检查
    //开庭公告
    courtPageChange(val) {
      this.courtPageIndex = parseInt(val)
      this.getInfo4(this.courtPageIndex)
    },
    //法院公告
    noticePageChange(val) {
      this.noticePageIndex = parseInt(val)
      this.getInfo5(this.noticePageIndex)
    },
    //裁判文书
    refereePageChange(val) {
      this.refereePageIndex = parseInt(val)
      this.getInfo6(this.refereePageIndex)
    },
    //股权冻结
    assisPageChange(val) {
      this.assistPageIndex = parseInt(val)
      this.getInfo7(this.assistPageIndex)
    },
    //被执行人
    enforcedPageChange(val) {
      this.enforcedPageIndex = parseInt(val)
      this.getInfo8(this.enforcedPageIndex)
    },
    //失信人信息
    dishonestPageChange(val) {
      this.dishonestPageIndex = parseInt(val)
      this.getInfo9(this.dishonestPageIndex)
    },
    //****税务检查
    //欠税次数
    revenueChange(val) {
      this.revenueIndex = parseInt(val)
      this.getInfo10(this.revenueIndex)
    },
    //****资产检查
    //动产抵押
    propertyChange(val) {
      this.propertyIndex = parseInt(val)
      this.getInfo11(this.propertyIndex)
    },
    //股权出质
    stockRightChange(val) {
      this.stockIndex = parseInt(val)
      this.getInfo12(this.stockIndex)
    },
    //土地抵押
    landChange(val) {
      this.landIndex = parseInt(val)
    },
  },
  mounted() {
    this.eid = this.$route.query.eid // this.companyNameAndEid.eid
    this.getInfo1(1)
    this.getInfo2(1)
    this.getInfo3(1)
    this.getInfo4(1)
    this.getInfo5(1)
    this.getInfo6(1)
    this.getInfo7(1)
    this.getInfo8(1)
    this.getInfo9(1)
    this.getInfo10(1)
    this.getInfo11(1)
    this.getInfo12(1)
  },
};
</script>
<style lang="scss" scoped>
.card-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.elcard {
  position: relative;
  flex: .5;
  padding: 0 !important;
  text-align: left !important;
  ::v-deep {
    .el-card__header {
      position: relative;
      &:before {
        position: absolute;
        top: 50%;
        left: 0;
        width: 5px;
        height: 30px;
        margin-top: -15px;
        content: '';
        background-color: $color101;
      }
    }
  }
  .tit {
    font-size: 14px;
    font-weight: bold;
    i {
      color: #504da6;
    }
  }
  .achievements {
    position: relative;
    li {
      display: block;
      border-bottom: 1px solid #EBEEF5;
      margin-bottom: 10px;
    }
  }
}
.plate {
  padding: 20px;
  .title-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    p {
      font-size: 14px;
      line-height: 30px;
      padding-left: 10px;
      font-weight: bold;
      i {
        display: inline-block;
        margin-right: 10px;
        font-size: 24px;
        font-weight: normal;
        vertical-align: middle;
        color: #514bab;
      }
      span {
        display: inline-block;
        vertical-align: middle;
      }
    }
  }
  ul {
    display: flex;
    width: 100%;
    overflow: hidden;
    li {
      flex: 1;
      display: flex;
      align-items: center;
      text-align: left;
      padding-left: 10px;
      line-height: 30px;
      p {
        color: #504f5d;
      }
      div {
        color: #514bab;
        font-weight: bold;
      }
    }
  }
}
/*开庭公告*/
.court {
  margin-bottom: 20px;
  padding-bottom: 20px;
  display: none;
  background: #fff;
}
.court.show {
  display: block;
}
.courtTitle {
  position: relative;
  line-height: 44px;
  // display: flex;
  // flex-wrap: nowrap;
  // justify-content: space-between;
  // margin-bottom: 25px;
  // position: relative;
}
.infoTitle {
  line-height: 35px;
  padding-left: 25px;
  font-size: 12px;
  color: #241c75;
  font-weight: bold;
  border-left: 5px solid #241c75;
}
.courtTitle > div {
  position: absolute;
  top: 7px;
  right: 0;
  width: 115px;
  height: 35px;
  line-height: 35px;
  background-color: $mainColor;
  font-size: 12px;
  color: #fff;
  border-radius: 5px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  text-align: center;
  font-weight: bold;
}
.courtList {
  width: 100%;
  padding: 0 50px;
  text-align: center;
}
/*法院公告*/
/*裁判文书*/
/*.referee{margin-bottom:75px;}*/
/*结果*/
.lastResultTitle {
  padding-left: 20px;
  margin: 25px 0;
  font-size: 14px;
  color: #241c75;
  font-weight: bold;
  border-left: 5px solid #241c75;
}
.lastResultTitle > span {
  color: #7674a3;
}
.lastResult > .body {
  padding: 20px 50px;
  border-top: 1px solid #8a88df;
  color: #7674a3;
}
/*分页样式*/
/*列表右上角下拉框*/
.courtTitle > div.selectBox,
.selectBox .el-dropdown {
  font-size: 14px;
  color: #fff;
}
.courtTitle > div.selectBox {
  position: absolute;
  top: 7px;
  right: 0;
}
</style>